package com.kimi.game2048

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel

class GameViewModel : ViewModel() {
    private val _tiles = MutableLiveData<List<Tile>>()
    val tiles: LiveData<List<Tile>> = _tiles

    init {
        resetGame()
    }

    fun resetGame() {
        val newTiles = mutableListOf<Tile>()
        for (i in 0 until 16) {
            newTiles.add(Tile())
        }
        _tiles.value = newTiles
    }

    // 添加其他游戏逻辑方法
}
